dy-lib=libmymethod.so
static-lib=libmymath.a

.PHONY:all 
all:$(dy-lib) $(static-lib)
	
$(dy-lib):myprint.o mylog.o
	gcc -shared -o $@ $^
mylog.o:mylog.c
	gcc -fPIC -c mylog.c
myprint.o:myprint.c
	gcc -fPIC -c $^
$(static-lib):mymath.o
	 ar -rc $@ $^
mymath.o:mymath.c
	 gcc -c $^ -o $@
.PHONY:clean
clean:
	rm -rf *.a *.o mylib *.so
.PHONY:output
output:
	mkdir -p mylib/include
	mkdir -p mylib/lib
	cp *.a mylib/lib
	cp *.h mylib/include
	cp *.so mylib/lib


